/**
 * 验证用户昵称
 * @param nickname 昵称
 * @author lian
 */
export const validateNickname = (nickname: string) => {
  return /^\S{2,6}$/.test(nickname)
}

/**
 * 验证手机号码
 * @param phoneNumber 手机号码
 * @author lian
 */
export const validatePhoneNumber = (phoneNumber: string) => {
  return /^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(phoneNumber)
}

/**
 * 验证验证码
 * @param code 验证码
 * @author lian
 */
export const validateCode = (code: string) => {
  return /^\d{6}$/.test(code)
}
